At present, a user experience degree of an electronic product is increasingly improved. For example, a mobile phone is used in different light source environments. An ambient light sensor in the mobile phone may detect brightness of an external light source, and the mobile phone automatically adjusts brightness of a mobile phone display according to the brightness of the external light source. Specifically, when brightness of external ambient light is relatively low, the brightness of the mobile phone display decreases, so that a user does not feel dazzled and power consumption is reduced; when the brightness of the external ambient light is relatively high, the brightness of the mobile phone display increases to avoid a phenomenon that the user cannot see a screen clearly. Therefore, use of the ambient light sensor improves the user experience degree and reduces the power consumption of the mobile phone.
However, output light intensities of an existing ambient light sensor are inconsistent under ambient light with different color temperatures, for example, daylight, cool white, and horizon light are three types of typical light sources with color temperatures ranging from high to low. As shown in FIG. 1, under three types of ambient light with different color temperatures, slopes of output light intensity curves of the ambient light sensor are different. Therefore, a light intensity only under a specific light source may be relatively accurately detected, and a deviation is generated when ambient light intensity detection is performed under ambient light with different color temperatures.